package com.jetbrains.licenseServer;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public class Products {
    public static UUID IDEA = UUID.fromString("49c202d4-ac56-452b-bb84-735056242fb3");
    public static UUID RESHARPER = UUID.fromString("5931f436-2506-415e-a0a9-27f50d7f62bf");
    public static UUID DOTTRACE = UUID.fromString("fdf9f05f-d8fe-44b1-9721-4455e35ea49f");
    public static UUID DOTMEMORY = UUID.fromString("DD8D40C7-866B-4204-9D56-9E620CD76A4D");
    public static UUID DOTCOVER = UUID.fromString("59BB7CF0-D203-4E54-9A5F-04FBB1AEBCD4");
    public static UUID RUBYMINE = UUID.fromString("b27b2de6-cc3c-4e75-a0a6-d3aead9c2d8b");
    public static UUID WEBSTORM = UUID.fromString("342e66b2-956c-4384-81da-f50365b990e9");
    public static UUID PHPSTORM = UUID.fromString("0d85f2cc-b84f-44c7-b319-93997d080ac9");
    public static UUID PYCHARM = UUID.fromString("e8d15448-eecd-440e-bbe9-1e5f754d781b");
    public static UUID APPCODE = UUID.fromString("8a00c148-759c-4289-80ae-63fe83cb14f9");

    public static UUID getProductUUID(String product) {
        return (UUID) availableProducts().get(product);
    }

    public static Map<String, UUID> availableProducts() {
        HashMap localHashMap = new HashMap();
        try {
            Field[] arrayOfField1 = Products.class.getDeclaredFields();
            for (Field localField : arrayOfField1) {
                localHashMap.put(localField.getName(), (UUID) localField.get(null));
            }
        } catch (IllegalAccessException localIllegalAccessException) {
            throw new RuntimeException(localIllegalAccessException);
        }
        return localHashMap;
    }
}
